{% import "_crumbs.html" as crumbs with context %}<!DOCTYPE html>
<html>
<head>
    <title>{% block title %}{% endblock %}</title>
    <link rel="stylesheet" href="{{ urls.static('app.css') }}?{{ app_css_hash }}">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{% for url in extra_css_urls %}
    <link rel="stylesheet" href="{{ url.url }}"{% if url.sri %} integrity="{{ url.sri }}" crossorigin="anonymous"{% endif %}>
{% endfor %}
{% for url in extra_js_urls %}
    <script {% if url.module %}type="module" {% endif %}src="{{ url.url }}"{% if url.sri %} integrity="{{ url.sri }}" crossorigin="anonymous"{% endif %}></script>
{% endfor %}
{%- if alternate_url_json -%}
    <link rel="alternate" type="application/json+datasette" href="{{ alternate_url_json }}">
{%- endif -%}
{%- block extra_head %}{% endblock -%}
</head>
<body class="{% block body_class %}{% endblock %}">
<div class="not-footer">
<header><nav>{% block nav %}{% block crumbs %}{{ crumbs.nav(request=request) }}{% endblock %}
    {% set links = menu_links() %}{% if links or show_logout %}
    <details class="nav-menu">
        <summary><svg aria-labelledby="nav-menu-svg-title" role="img"
            fill="currentColor" stroke="currentColor" xmlns="http://www.w3.org/2000/svg"
            viewBox="0 0 16 16" width="16" height="16">
                <title id="nav-menu-svg-title">Menu</title>
                <path fill-rule="evenodd" d="M1 2.75A.75.75 0 011.75 2h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 2.75zm0 5A.75.75 0 011.75 7h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 7.75zM1.75 12a.75.75 0 100 1.5h12.5a.75.75 0 100-1.5H1.75z"></path>
        </svg></summary>
        <div class="nav-menu-inner">
            {% if links %}
            <ul>
                {% for link in links %}
                <li><a href="{{ link.href }}">{{ link.label }}</a></li>
                {% endfor %}
            </ul>
            {% endif %}
            {% if show_logout %}
            <form action="{{ urls.logout() }}" method="post">
                <input type="hidden" name="csrftoken" value="{{ csrftoken() }}">
                <button class="button-as-link">Log out</button>
            </form>{% endif %}
        </div>
    </details>{% endif %}
    {% if actor %}
    <div class="actor">
        <strong>{{ display_actor(actor) }}</strong>
    </div>
    {% endif %}
{% endblock %}</nav></header>

{% block messages %}
{% if show_messages %}
    {% for message, message_type in show_messages() %}
        <p class="message-{% if message_type == 1 %}info{% elif message_type == 2 %}warning{% elif message_type == 3 %}error{% endif %}">{{ message }}</p>
    {% endfor %}
{% endif %}
{% endblock %}

<section class="content">
{% block content %}
{% endblock %}
</section>
</div>
<footer class="ft">{% block footer %}{% include "_footer.html" %}{% endblock %}</footer>

{% include "_close_open_menus.html" %}

{% for body_script in body_scripts %}
    <script{% if body_script.module %} type="module"{% endif %}>{{ body_script.script }}</script>
{% endfor %}

{% if select_templates %}<!-- Templates considered: {{ select_templates|join(", ") }} -->{% endif %}
</body>
</html>
